﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AFSharedLibrary;

namespace UIDesigner.SurfaceProperties.Operations
{
    public class BindProperties : IPropertyGroup
    {
        [System.Xml.Serialization.XmlIgnore()]
        protected BindStateOptions m_eObjectBindStateOptions;
        [System.Xml.Serialization.XmlIgnore()]
        protected PreBindOptions m_ePreBindOptions;
        [System.Xml.Serialization.XmlIgnore()]
        protected IEventStateValue m_objBindState;
        [System.Xml.Serialization.XmlIgnore()]
        protected PostBindExistingOptions m_ePostBindExistingOptions;
        [System.Xml.Serialization.XmlIgnore()]
        protected PostBindNewOptions m_ePostBindNewOptions;

        public PostBindNewOptions PostBindNewOptions
        {
            get { return m_ePostBindNewOptions; }
            set { m_ePostBindNewOptions = value; }
        }

        public PostBindExistingOptions PostBindExistingOptions
        {
            get { return m_ePostBindExistingOptions; }
            set { m_ePostBindExistingOptions = value; }
        }

        public BindStateOptions BindStateOptions
        {
            get { return m_eObjectBindStateOptions; }
            set { m_eObjectBindStateOptions = value; }
        }

        public PreBindOptions PreBindOptions
        {
            get { return m_ePreBindOptions; }
            set { m_ePreBindOptions = value; }
        }

        [System.Xml.Serialization.XmlIgnore()]
        public IEventStateValue BindState
        {
            get
            {
                return m_objBindState;
            }

            set
            {
                m_objBindState = value;
            }
        }

        public BindProperties()
        {
        }

        public object Clone()
        {
            BindProperties objProperties = new BindProperties();

            objProperties.BindStateOptions = this.BindStateOptions;
            objProperties.PreBindOptions = this.PreBindOptions;
            objProperties.PostBindNewOptions = this.PostBindNewOptions;
            objProperties.PostBindExistingOptions = this.PostBindExistingOptions;

            return objProperties;
        }
    }
}
